import legacy from '@vitejs/plugin-legacy'
import ScriptSetup from 'unplugin-vue2-script-setup/vite'
import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2'

export default defineConfig({
  plugins: [
    legacy({
      targets: ['ie >= 11'],
      additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
    }),
    ScriptSetup(),
    createVuePlugin(),
  ],
})
